<?php $nounarr=array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'); ?>
<link rel="stylesheet" type="text/css" href="<?php echo PUBLIC_URL ?>css/content.css"><!-- 首页内容区域大盒子-->
<link rel="stylesheet" type="text/css" href="<?php echo PUBLIC_URL ?>css/with.css">
<script src="<?php echo PUBLIC_URL ?>js/jquery-1.8.3.js"></script>
<link rel="stylesheet" href="<?php echo PUBLIC_URL ; ?>kindeditor/themes/default/default.css" />
		<script charset="utf-8" src="<?php echo PUBLIC_URL ; ?>kindeditor/kindeditor-min.js"></script>
		<script charset="utf-8" src="<?php echo PUBLIC_URL ; ?>kindeditor/lang/zh_CN.js"></script>
		<script>
			KindEditor.ready(function(K) {
				K.create('textarea[name="content"]', {
					filterMode : false
				});
			});
		</script>
<style>
#footer{margin-top:20px;}
</style>
<script src="<?php echo PUBLIC_URL ?>js/jquery-1.8.3.js" type="text/javascript" charset="utf-8"></script>
<div class="n" style="height:35px;"></div><!--放个div，才能让龙播图在ff中动作-->
<div class="nav" style="height:40px; margin-top:20px; text-align:left;">
            <i style="margin-left:20px; height:40px; line-height:40px;"> 当前位置：<i style="color:green">首页 > 专业名词</i> </i>
    </div>
<div id="content">
   
        <div id="content-tow"><!-- 包括左右两个盒子start-->
                <!-- 便利区左盒子 -->
            <div style="position:relative;">
                                  
                    <div style="border-bottom:1px solid #F5F4F3;width:68%;margin-top:-30px;float:left;">
                                                
                                <div class="no" style="position:relative;">
                                    <h3 style="position:relative; font-size:30px;">专业名词</h3>
                                    <img usemap="#mymap1" style="position:absolute;left:1px;cursor:pointer;" src="<?php echo PUBLIC_URL ?>images/ao/map.bmp">
                                    <map name="mymap1">
                                        <area shape="rect" coords="7,16,23,27" href="#A">
                                        <area shape="rect" coords="5,33,22,46" href="#B">
                                        <area shape="rect" coords="6,51,26,63" href="#C">
                                        <area shape="rect" coords="10,69,20,80" href="#D">
                                        <area shape="rect" coords="5,89,24,99" href="#E">
                                        <area shape="rect" coords="5,104,25,115" href="#F">
                                        <area shape="rect" coords="4,123,26,134" href="#G">
                                        <area shape="rect" coords="7,147,24,155" href="#H">
                                        <area shape="rect" coords="6,160,24,172" href="#I">
                                        <area shape="rect" coords="7,177,22,188" href="#J">
                                        <area shape="rect" coords="7,196,22,209" href="#K">
                                        <area shape="rect" coords="5,214,22,223" href="#L">
                                        <area shape="rect" coords="8,232,23,241" href="#M">
                                        <area shape="rect" coords="3,248,26,260" href="#N">
                                        <area shape="rect" coords="4,266,23,277" href="#O">
                                        <area shape="rect" coords="5,284,26,297" href="#P">
                                        <area shape="rect" coords="6,302,22,319" href="#Q">
                                        <area shape="rect" coords="6,323,25,334" href="#R">
                                        <area shape="rect" coords="3,340,23,351" href="#S">
                                        <area shape="rect" coords="6,357,22,369" href="#T">
                                        <area shape="rect" coords="5,375,24,387" href="#U">
                                        <area shape="rect" coords="3,392,25,403" href="#V">
                                        <area shape="rect" coords="86,412,22,423" href="#W">
                                        <area shape="rect" coords="7,429,23,440" href="#X">
                                        <area shape="rect" coords="4,447,22,457" href="#Y">
                                        <area shape="rect" coords="3,464,25,477" href="#Z">
                                </map>
                                     
                                     <?php

                                    
                                     for($i=0; $i<26; $i++){ 
                                     ?>
                                     <div class="forno" style="border-top:1px solid #AAC619;margin-top:20px;padding:20px;text-align:left;padding-left:30px;">
                                             <div class="fordd" style="font-size:50px;color:#AAC619; width:100px;background:#FFFFFF;position:relative;left:45%;text-align:center;top:-50px;">
                                                <a name="<?php echo $nounarr[$i] ?>"><?php echo $nounarr[$i]; ?></a>
                                            </div>
                                            
                                            <?php
                                            if($moreNoun){
                                            foreach($moreNoun as $k=>$v){
                                                if($k == strtolower($nounarr[$i])){
                                               
                                                for($j=0; $j<count($v);$j++){
                                            ?>
                                                <font id="<?php echo $v[$j]['ID']; ?>" style="cursor:pointer;margin-top:10px;display:inline-block;font-size:12px;" onclick="nounredi(this.id)">
                                                <?php echo $v[$j]['post_title']; ?>
                                                </font>
                                                
                                            <?php } }  } } ?>
                                            
                                            <a  style="position:absolute; right:1px;margin-top:50px;text-decoration:none;color:#AAC619" href="#">返回</a>
                                     </div>
                                     <?php } ?>
                                </div>

                  </div>
                <!-- 便利区end -->
                        <!--测边栏(1)start -->
           
                        <?php 
                             include_once(VIEWS_URL.'noun/aside_one.php'); 
                        ?>
                        <!--测边栏end -->

            </div>
        </div>
          <!-- 手机扫描start-->
                        <div style="width:30%;right:-1px;float:right;margin-top:600px;z-index:20000">
                                                                  
                                        
                                        <img  style="position:relative;top:710px;" width="100%" src="<?php echo PUBLIC_URL ?>images/ao/ad-img02.jpg">
                                      
                                        <!-- 手机扫描-->
                                        <!-- 推荐咨询s-->
                                        <div id="tuijian" style="left:-1px;position:relative; border-bottom:1px dashed gray;text-align:left;height:50px;margin-top:750px;">
                                                <img src="<?php echo PUBLIC_URL ?>images/ao/tuijian.bmp" >
                                        </div>
                                        <div class="tj" style="margin-top:10px; width:80%;">
                                                <?php for($i=0; $i<4; $i++){ ?>
                                                    <div  class="tj-tj"style="position:relative;width:125%;padding-right:3px; height:150px; border-bottom:1px dashed gray;word-break: break-all;word-wrap: break-word;text-align:left;line-height:20px;">
                                                        <h3 style="font-size:20px;color:#A5C82C;">癌症高发群：你被盯上吗</h3>
                                                        <p>很多人听到这个词很多人听到这个词很多人听到这个词很多人听到这个词
                                                        <img  onclick="alert('更多多') "style="position:absolute;top:120px;left:75%;cursor:pointer;" src="<?php echo PUBLIC_URL ?>images/ao/more.bmp">
                                                        </p>
                                                    </div>
                                                <?php } ?>
                                        </div>

                                          <!-- 推荐咨询e-->
                        </div>
            <!-- 包括左右两个盒子end-->
</div>
<script>
    function hf(obj)
    {
        var parent=obj.parentNode.parentNode.parentNode;
        parent.style.height='260px';
        obj.parentNode.nextSibling.nextSibling.style.display='block';
       }
    
    function next(obj)
    {
        while(obj){
            if(obj.nextSibling.nodeName=="FORM"){
                return obj.nextSibling;
            }else{
                obj=obj.nextSibling;
            }
        }
    }
/*8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888*/
    function hf(obj)
    {
        var parent=obj.parentNode.parentNode.parentNode;
        parent.style.height='260px';
        obj.parentNode.nextSibling.nextSibling.style.display='block';
       }
    
    function next(obj)
    {
        while(obj){
            if(obj.nextSibling.nodeName=="FORM"){
                return obj.nextSibling;
            }else{
                obj=obj.nextSibling;
            }
        }
    }
    
    function checklogin(){
        var content1 = $('textarea[name=comment]').val();
        var username = $('input[name=comment_author]').val();
        var userid = $('input[name=userID]').val();
       if( username == "" && userid == ""){
            alert('请您登录或者先去注册');
        }else if( content1 == ""){
            alert('评论内容不能空！！');
            exit;
        }else{
            var pubcontent = $('textarea[name=comment]').val();//此为刚刚发表的评论
            var username = $('input[name=comment_author]').val();
            var userid = $('input[name=userID]').val();
            var userip = $('input[name=login_ip]').val();
            var useremail = $('input[name=user_email]').val();
            var articleid = $('input[name=articleID]').val();
            
             $.ajax({
                    url:'<?php echo DOCUMENT."article/pubcomment" ?>',
                    data:'pubcontent='+pubcontent+'&username='+username+'&userid='+userid+'&userip='+userip+'&useremail='+useremail+'&articleid='+articleid,
                    type:'post',
                    success:function(data){
                        if(data['status'] = 1){
                            var pingdiv = $('<div class="h"><div class="one1" style="position:relative; float:left;left:1px;"><img width="60" height="60" src="<?php echo PUBLIC_URL ; ?>images/1.jpg" /></div><div class="tow1" style="position:relative;left:100px;width:80%;"><font style="position:absolute;left:1px;;top:10px; width:500px;text-align:left;color:#336598;"><?php echo $_SESSION['username']; ?> <?php echo date("Y-m-d H:i:s",time())?> | </font><br><p style="position:relative;top:20px;left:1px;display:block;width:100%; height:50px;display:block;overflow:hidden;text-align:left;margin-bottom:30px;">'+pubcontent+'</p></div><div class="three1" style="position:absolute;left:85%;top:10px;font-size:13px;width:100px;height:100px;text-align:right;"><h3 style="position:absolute;font-size:20px;color:#A8C537;right:-10px;">OK</h3></div><div  style="color:#336596;margin-top:0px;text-align:right;clear:both;"><font name="wwee" style="cursor:pointer;">回复 ｜ </font><font>顶<font>[0]</font>｜ </font><font>楼顶-地下室</font></div></div>');
                            var parentdiv = $('#pl');
                            parentdiv.append(pingdiv);
                        }
                    },
                    error:function(){
                        alert('ww');
                    },
                    dataType:'json'
                    })
           
        }
    }

    $('font[name=wwee]').live('click', function(){

        //$(this).parent().parent().find('div[name=rep]').css('display', 'block');
        var divv = $('<div name="rep" style="display:block;margin-top:10px;text-align:right;clear:both;"><form><input type="hidden" name="articleID" value="<?php echo $_GET['ID']; ?>"><input type="hidden" name="comment_author" value="<?php echo $_SESSION['username']; ?>"><input type="hidden" name="userID" value="<?php echo $_SESSION['userid']; ?>"><input type="hidden" name="login_ip" value="<?php echo $_SESSION['loginip']; ?>"><input type="hidden" name="user_email" value="<?php echo $_SESSION['useremail']; ?>"><input type="hidden" name="origincommentID" value="<?php echo $v['comment_ID']; ?>"><a name="one"><textarea name="tow_replay" style="width:72%;height:100px;font-size:20px;color:#B8CE45;margin-left:100px;float:left;" placeholder="我也说一句吧" ></textarea></a><br><input name="insertrow" style="color:gray;width:100px; height:30px; background:#F5F4F3;color:#B1C845;font-size:20px;text-align:center;cursor:pointer;float:right;margin-top:18px;margin-right:30px;" value="发表"></form></div>');
        $(this).parent().parent().append(divv);
    });
    
    $('input[name=insertrow]').live('click', function(){
        
        var username = $('input[name=comment_author]').val();
        var userid = $('input[name=userID]').val();
       if(username == "" && userid == ""){
            alert('请您登录或者先去注册');
        }else{
        var obj = $(this);
        var content = $(this).parent().find('textarea[name=tow_replay]').val();//二级回复内容
        var fathercommentID = $(this).parent().parent().parent().find('div[name=towcommentID]').attr('id');//父级评论ID
        var username = $('input[name=comment_author]').val();
        var userid = $('input[name=userID]').val();
        var userip = $('input[name=login_ip]').val();
        var useremail = $('input[name=user_email]').val();
        var articleid = $('input[name=articleID]').val();
        $.ajax({
            url:'<?php echo DOCUMENT."article/towcomment"; ?>',
            data:'content='+content+'&fathercommentID='+fathercommentID+'&username='+username+'&userid='+userid+'&userip='+userip+'&useremail='+useremail+'&articleid='+articleid,
            type:'post',
            success:function(data){

                if(data['status'] == 1){
                    var gg = obj.parent().parent();
                    gg.css('display', 'none');
                    var row = $('<div style="margin-left:100px;width:80%; height:50px;text-align:left;margin-top:10px; padding-top:5px;clear:both;margin-bottom:30px;"><img width=20 height=20 src="./img.jpg" />&nbsp;&nbsp;<font><?php echo $_SESSION["username"]; ?>：</font>'+content+'<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style="margin-top:50px;"><?php echo date('Y-m-d',time())?></font>&nbsp;&nbsp;&nbsp;<font style="cursor:pointer;" name="wwee">回复</font></div>');
                    gg.after(row);
                    
                }
            },
            error:function(){
                alert('失败');
            },
            dataType:'json'
        });
        
        
        }
    });
    
    $('font[name=deltowcomment]').live('click', function(){
        var commentID = $(this).attr('id');
        var obj = $(this);

        $.ajax({
            
            url:'<?php echo DOCUMENT."article/deltowcomment"; ?>',
            data:'delID='+commentID,
            type:'get',
            success:function(data){
                if(data['status'] == 1){
                    obj.parent().css('display', 'none');
                    
                }
            },
            error:function(){
                alert('失败');
            },
            dataType:'json'
        });
    });
    
    $('font[name=delparent]').live('click', function(){
        if(confirm('你确定要删除这条评论吗？')){
            var obj = $(this);
            var parentID = $(this).attr('id');
            $.ajax({
                
                url:'<?php echo DOCUMENT."article/delparentcomment"; ?>',
                data:'delID='+parentID,
                type:'get',
                success:function(data){
                    
                    obj.parent().parent().animate({
                       height: 'toggle', opacity: 'toggle'
                     }, "slow");
                },
                
                error:function(){
                    alert('失败');
                },
                dataType:'json'
            });
        
        }else{
            alert('ww');
        }
    
    });
/*8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888*/
function nounredi(objID){
    alert('你好，这是本文章的ID,请根据此ID去查此文章，页面待定');
    alert(objID);
}
</script>


    